<template>
	<view class="container">
		<view class="header uni-flex uni-row flex-between header-nav">
			<uni-nav-bar title="消息详情">
				<template slot='left'>
					<view class="flex width-100">
						<i class='iconfont iconfanhui' link @click='goBack()'></i>
					</view>
				</template>
			</uni-nav-bar>
		</view>
		<view class="message-detail pd-t-80 card-header">
			<uni-card :title="detailData.sendFlag || ' '" :extra="detailData.updateTime">
			    {{detailData.content}}
			</uni-card>
		</view>
	</view>
</template>
<script>
	import {remindWarningStatus} from '@/common/api/profile.js'
	export default {
		data() {
			return {
				detailData:null,
			}
		},
		onLoad(data) {
			this.detailData = JSON.parse(data.detailData);
			console.log(this.detailData);
			this.changeStatus();
		},
		methods: {
			changeStatus(){
				if(this.detailData.status == 0){
					remindWarningStatus(this.detailData.logId).then( res =>{
						console.log(res)
					})
				}
			},
			goBack(){
				uni.navigateTo({
				url:'/pages/Personal/RemindWarning/RemindWarning'
				})
			}
		}
	}
</script>
<style scoped>
.message-detail /deep/ .uni-card__header-title-text{white-space: unset!important;font-weight: bold;}
</style>
